<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./023drop和dropRight.js"></script>
    <script>
        let arr=[1,2,3,4,5,6]
        drop(arr,2)
        console.log(arr);  //因为它先调用这个语句 再调用上面的drop(arr,2) 所以结果不一样
        console.log(drop([1,2,3,4,5,6],2));
        console.log(dropRight([1,2,3,4,5,6],2));
    </script>
</body>
</html>